package com.caigou.modules.login.network.api

import com.caigou.comm.base.bean.HttpResult
import com.caigou.comm.base.bean.UserBean
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * @author #Suyghur.
 * Created on 2021/09/27
 */
interface HttpLoginApiService {

    @POST("/api/user/register")
    fun register(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<UserBean>>

    @POST("/api/user/login")
    fun launcher(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<UserBean>>

    @GET("/api/sms/getCode")
    fun getSmsCode(@Query("mobile") mobile: String): Flow<HttpResult<String>>

    @POST("/api/password/forget")
    fun forgetPwd(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>
}